<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>tools.nt2csv.NTriple2CSV</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tools.nt2csv-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;tools ::
        <a href="tools.nt2csv-module.html">Module&nbsp;nt2csv</a> ::
        Class&nbsp;NTriple2CSV
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="tools.nt2csv.NTriple2CSV-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class NTriple2CSV</h1><p class="nomargin-top"><span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV">source&nbsp;code</a></span></p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tools.nt2csv.NTriple2CSV-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">fname</span>,
        <span class="summary-sig-arg">tgraph</span>)</span><br />
      Initialises the converter.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="create_outfilename"></a><span class="summary-sig-name">create_outfilename</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">infilename</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.create_outfilename">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tools.nt2csv.NTriple2CSV-class.html#strip_anglebr" class="summary-sig-name">strip_anglebr</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>)</span><br />
      Strips angle barckets from string, that is &lt;...&gt; into ...</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.strip_anglebr">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="split_object"></a><span class="summary-sig-name">split_object</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.split_object">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tools.nt2csv.NTriple2CSV-class.html#strip_datatype" class="summary-sig-name">strip_datatype</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>)</span><br />
      Removes NTriple datatype, that is, it turns 
      '...'^^&lt;http://www.w3.org/2001/XMLSchema#string&gt; into '...'</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.strip_datatype">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tools.nt2csv.NTriple2CSV-class.html#strip_langtag" class="summary-sig-name">strip_langtag</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>)</span><br />
      Removes NTriple language tag, that is, it turns '...'@de  into '...'</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.strip_langtag">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tools.nt2csv.NTriple2CSV-class.html#extract_datatype" class="summary-sig-name">extract_datatype</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>)</span><br />
      Extracts the NTriple datatype, that is, it turns 
      '...'^^&lt;http://www.w3.org/2001/XMLSchema#string&gt; into 
      'http://www.w3.org/2001/XMLSchema#string'</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.extract_datatype">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tools.nt2csv.NTriple2CSV-class.html#extract_langtag" class="summary-sig-name">extract_langtag</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">text</span>)</span><br />
      Extracts the NTriple language tag, that is, it turns '...'@de into 
      'de'</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.extract_langtag">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="convertfile"></a><span class="summary-sig-name">convertfile</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ifile</span>,
        <span class="summary-sig-arg">tg</span>)</span><br />
      Takes an RDF file in <a 
      href="http://www.w3.org/TR/rdf-testcases/#ntriples" 
      target="_top">NTriples format</a> and turns it into a <a 
      href="http://code.google.com/apis/bigquery/docs/uploading.html#createtabledata"
      target="_top">BigQuery-compliant</a>  CSV file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.convertfile">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="convert"></a><span class="summary-sig-name">convert</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Depending on the initialisation, converts a single NTriple file or an
      entire directory with NTriple files to CSV.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.convert">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">fname</span>,
        <span class="sig-arg">tgraph</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Initialises the converter. If a .nt file is given, the converter uses 
  this as an input to create a .csv file. However, if a directory is 
  specified, then all .nt files in this directory are converted to .csv 
  files.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>fname</code></strong> - The input NTriples file (or directory with NTriples files).</li>
        <li><strong class="pname"><code>tgraph</code></strong> - The target graph URI.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="strip_anglebr"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">strip_anglebr</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">text</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.strip_anglebr">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Strips angle barckets from string, that is &lt;...&gt; into ...</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>the string with '&lt;'...'&gt;' removed</dd>
  </dl>
</td></tr></table>
</div>
<a name="strip_datatype"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">strip_datatype</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">text</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.strip_datatype">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Removes NTriple datatype, that is, it turns 
  '...'^^&lt;http://www.w3.org/2001/XMLSchema#string&gt; into '...'</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>the string with '^^&lt;...&gt;' removed</dd>
  </dl>
</td></tr></table>
</div>
<a name="strip_langtag"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">strip_langtag</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">text</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.strip_langtag">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Removes NTriple language tag, that is, it turns '...'@de  into 
  '...'</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>the string with '@..' removed</dd>
  </dl>
</td></tr></table>
</div>
<a name="extract_datatype"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">extract_datatype</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">text</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.extract_datatype">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Extracts the NTriple datatype, that is, it turns 
  '...'^^&lt;http://www.w3.org/2001/XMLSchema#string&gt; into 
  'http://www.w3.org/2001/XMLSchema#string'</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>the NTriple datatype as a string</dd>
  </dl>
</td></tr></table>
</div>
<a name="extract_langtag"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">extract_langtag</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">text</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tools.nt2csv-pysrc.html#NTriple2CSV.extract_langtag">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Extracts the NTriple language tag, that is, it turns '...'@de into 
  'de'</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>the NTriple language tag as a string</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tools.nt2csv-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1
    on Sun Dec 19 13:06:05 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
